Fix: refactor to adapt to changes to shapely dependency#1376
Fix: refactor to adapt to changes to shapely dependency#1376chalmerlowe merged 7 commits intomainfrom
Conversation
|
@shollyman can you take a look at this for me and give me a sanity check? |
shollyman
left a comment
There was a problem hiding this comment.
I see in the pandas helper we also use the well-known bytes reader, does this also need cleanup?
https://github.com/googleapis/python-bigquery/blob/main/google/cloud/bigquery/_pandas_helpers.py#L66
May be also worth checking system tests for unusual setups.
Are there other imports under shapely that need scrutiny beyond shapely.geos?
|
I checked the remainder of the code for references to Added a minor change based on what I found. |
|
There's no test changes? Is this indicative that our existing tests were sufficient in catching and exercising this dependency? Do we need to exercise anything new as part of the changes? |
The existing tests were already using the new refactoring > they referred to the correct functions in the correct files. |
) * fix: refactored to account for changes in dependency * Removes comment and ensures linting success * refactor to use loads() function * fix: refactors to account for changes to shapely dependency * fix: refactors to account for changes to shapely dependency * blacken the code * add mypy ignore flag for shapely import
The
shapelylibrary has undergone some internal refactoring.Certain classes, such as
WKTReaderare no longer used, instead, the library relies on some functions that are imported from what appears to bepygeos.This change points at the correct function to replace the outdated method call.
Fixes #1364 🦕
Context:
This issue appeared when running a test in
python-bigquery-sqlalchemy... when running certain tests in that library, the code tried to load thetests/unit/testconf.pyfile from that library which referencestable.pyin this library.That was causing some failures in tests in the
python-bigquery-sqlalchemylibrary.